package org.goldenport.g3.events.entity

import org.goldenport.g3.G3Event
import org.goldenport.g3.events._
import org.goldenport.g3.messages._
import org.goldenport.g3.messages.entity.EntityCommand

/**
 * @since   Aug. 15, 2010
 * @version Oct. 10, 2010
 * @author  ASAMI, Tomoharu
 */
class EntityCreated(uri: String, val rollforward: G3RollforwardResults, val besteffort: G3BesteffortResults) extends Mkcoled(uri)

class EntityFetched(
  uri: String,
  command: EntityCommand,
  records: RecordSet,
  single: Boolean = true,
  cause: Option[G3Event] = None
) extends RecordFetched(uri, command, records, single, cause)

class EntityQueried(
  uri: String,
  command: EntityCommand,
  records: RecordSet,
  cause: Option[G3Event] = None
) extends RecordQueried(uri, command, records, cause)

class EntityInserted(uri: String, val rollforward: G3RollforwardResults, val besteffort: G3BesteffortResults) extends Posted(uri)

class EntityUpdated(uri: String, val rollforward: G3RollforwardResults, val besteffort: G3BesteffortResults) extends Putted(uri)

class EntityDeleted(uri: String, val rollforward: G3RollforwardResults, val besteffort: G3BesteffortResults) extends Deleted(uri)

class EntityDropped(uri: String, val rollforward: G3RollforwardResults, val besteffort: G3BesteffortResults) extends Deleted(uri)
